<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"  xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="centre/manage/include :: header"></head>
<link rel="stylesheet" type="text/css" href="/css/plugins/layui/layui.css"/>
<link href="/css/jquery-select/jquery.searchableSelect.css" rel="stylesheet" type="text/css">
<body class="gray-bg">
	<div class="wrapper wrapper-content ">
		<div class="row">
			<div class="col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-content">
						<form class="form-horizontal m-t" id="editCommanderForm">
							<input type="hidden" th:value="${member.id}" id="id" name="id">
							<input type="hidden" th:value="${flag}" id="flag" name="flag">
							<input type="hidden" th:value="${member.teamDesc.remark}" id="remark" name="remark">
							<table class="table table-bordered table-condensed">
								<tbody>
								<tr>
									<th class="required" style="text-align: right;">昵称</th>
									<td ><input id="nickname" name="nickname" class="form-control" type="text" th:value="${member.nickname}"/></td>
								</tr>
								<tr>
									<th class="required" style="text-align: right;">openId</th>
									<td th:text="${member.openid}"></td>
								</tr>
								<tr>
									<th class="required" style="text-align: right;">真实姓名</th>
									<td><input id="realname" name="realname" class="form-control" type="text" th:value="${member.realname}"/></td>
								</tr>

								<tr>
									<th class="required" style="text-align: right;">选择行业品牌</th>
									<td >
										<select data-placeholder="行业品牌" class="form-control chosen-select" name="industryBrandId" tabindex="2"  id="industryBrandId">
											<option value="">选择行业品牌</option>
											<option th:each="item: ${industryBrands}"
													th:text="${item.name}"
													th:value="${item.id}"
													th:selected="${member.industryBrandId}==${item.id}"></option>
										</select>
<!--											<label class="col-sm-2 control-label">行业选择:</label>-->
<!--											<div class="col-sm-4">-->
<!--												<select data-placeholder="" class="form-control chosen-select" tabindex="2" id="industryId"-->
<!--														name="industryId" onchange="industryChange(this)" th:field="*{member.industryId}">-->
<!--													<option value="" selected="selected">请先选择行业</option>-->
<!--													<option th:each="item: ${industrys}" th:text="${item.name}"-->
<!--															th:value="${item.id}"></option>-->
<!--												</select>-->
<!--											</div>-->
<!--											<div class="col-sm-4">-->
<!--												<select data-placeholder="" class="form-control chosen-select" tabindex="2" id="industryBrandId"-->
<!--														name="industryBrandId" th:field="*{member.industryBrandId}">-->
<!--													<option value="" selected="selected">行业品牌</option>-->
<!--													&lt;!&ndash;											<option th:value="${member.industryBrandId}" th:text="${member.industryBrandName}"></option>&ndash;&gt;-->
<!--													<option th:each="item: ${industryBrands}"-->
<!--															th:text="${item.name}"-->
<!--															th:value="${item.id}"-->
<!--															th:selected="${member.industryBrandId}==${item.id}"></option>-->
<!--												</select>-->
<!--											</div>-->
								</tr>



								<tr>
									<th class="required" style="text-align: right;">性别</th>
									<td>
                                       <label class="radio-inline"><input th:field="*{member.gender}" type="radio" name="gender" value="1"/>男</label> 
							           <label class="radio-inline"><input th:field="*{member.gender}" type="radio" name="gender" value="2" />女</label>
							           <label class="radio-inline"><input th:field="*{member.gender}" type="radio" name="gender" value="0" />保密</label>
                                    </td>
								</tr>
								<tr>
									<th class="required" style="text-align: right;">保证金</th>
									<td th:text="${member.bondmoney}"></td>
								</tr>
								<tr>
									<th class="required" style="text-align: right;">店铺编号</th>
									<td>---</td>
								</tr>
								<tr>
									<th class="required" style="text-align: right;">个性签名</th>
									<td><input id="qianming" name="qianming" class="form-control" type="text" th:value="${member.qianming}"/></td>
								</tr>
								<tr th:if="${flag} == '0'">
									<th class="required" style="text-align: right;">选择商户</th>
									<td >
								<select data-placeholder="商户" class="form-control chosen-select" name="centreId" tabindex="2"  id="centreId">
									<option value="">选择商户</option>
									<option th:each="item: ${centreList}" th:text="${item.name}" th:value="${item.centreId}" th:selected="${member.centreId eq item.centreId}"></option>
								</select>
									</td>
								</tr>
								
								<tr>
									<th class="required" style="text-align: right;">推荐门店</th>
									<td>
									     <input type="hidden" id="centreId"  name="centreId" th:value="${member.centreId}">
									     <input id="upTeamid" name="upTeamid" class="form-control" type="hidden" th:value="${member.upTeamid}">
									     <input id="upTeamname" name="upTeamname" placeholder="点击更换推荐门店" th:value="${member.upTeamname}" class="form-control" type="text" readonly  onclick="chooseCommander()">
									</td>
								</tr>
								<tr>
									<th class="required" style="text-align: right;">手机号码</th>
									<td><input id="mobile" name="mobile" class="form-control" readonly="readonly" type="text" th:value="${member.mobile}"/></td>
								</tr>
								<tr>
									<th class="required" style="text-align: right;width: 16%;">身份证正面</th>
									<td>
									<div class="col-sm-10">
									<div class="col-sm-6">
										<div class="input-group ">
											<input type="text" name="idCardZ" id="idCardZ" class="form-control"
												autocomplete="off" th:value="${member.teamDesc.idCardZ}"> 
											<span class="input-group-btn">
												<button class="btn btn-sm btn-default btn-file" style="padding:7px 10px" type="button"
													onclick="onSelectImgBtnClick('idCardZ','idCardZImg')">选择图片</button>
											</span>
										</div>
										<div class="input-group " style="margin-top: .5em;">
											<img th:src="${member.teamDesc.idCardZ}" id="idCardZImg" 
												style="width:30%"/>
										</div>
									</div>
								</div>
									   <!--  <img style="width:150px;height:100px;" th:src="@{${member.teamDesc.idCardZ}}" th:if="${member.teamDesc.idCardZ} != ''"> -->
									</td>
								</tr>
								<tr>
									<th class="required" style="text-align: right;width: 16%;">身份证反面</th>
									<td>
									<div class="col-sm-10">
									<div class="col-sm-6">
										<div class="input-group ">
											<input type="text" name="idCardF" id="idCardF" class="form-control"
												autocomplete="off" th:value="${member.teamDesc.idCardF}"> 
											<span class="input-group-btn">
												<button class="btn btn-sm btn-default btn-file" style="padding:7px 10px" type="button"
													onclick="onSelectImgBtnClick('idCardF','idCardFImg')">选择图片</button>
											</span>
										</div>
										<div class="input-group " style="margin-top: .5em;">
											<img th:src="${member.teamDesc.idCardF}" id="idCardFImg" 
												style="width:30%"/>
										</div>
									</div>
								</div>
									    <!-- <img style="width:150px;height:100px;" th:src="@{${member.teamDesc.idCardF}}" th:if="${member.teamDesc.idCardF} != ''"> -->
									</td>
								</tr>
								<tr>
									<th class="required" style="text-align: right;width: 16%;">门店照片</th>
									<td>
									<div class="col-sm-10">
									<div class="col-sm-6">
										<div class="input-group ">
											<input type="text" name="store" id="store" class="form-control"
												autocomplete="off" th:value="${member.store}">
											<span class="input-group-btn">
												<button class="btn btn-sm btn-default btn-file" style="padding:7px 10px" type="button"
													onclick="onSelectImgBtnClick('store','storeImg')">选择图片</button>
											</span>
										</div>
										<div class="input-group " style="margin-top: .5em;">
											<img th:src="${member.store}" id="storeImg"
												style="width:30%"/>
										</div>
									</div>
								</div>
									    <!-- <img style="width:150px;height:100px;" th:src="@{${member.teamDesc.store}}" th:if="${member.teamDesc.store} != ''"> -->
									</td>
								</tr>
								<tr>
									<th class="required" style="text-align: right;">门店商店所在地区</th>
									<td>
									   <div class="gg-formDetail gg-font0" data-toggle="distpicker" th:attr="data-province=${member.tProvince},data-city=${member.tCity},data-district=${member.tArea}">
		                                    <div class="gg-area">
		                                        <select class="form-control" id="tProvince" name="tProvince">
		                                        </select>
		                                    </div>
		                                    <div class="gg-area">
		                                        <select class="form-control" id="tCity" name="tCity">
		                                        </select>
		                                    </div>
		                                    <div class="gg-area">
		                                        <select class="form-control" id="tArea" name="tArea">
		                                        </select>
		                                    </div>
	                                   </div>
									</td>
								</tr>
								<tr>
									<th class="required" style="text-align: right;">门店名称</th>
									<td><input id="tXiaoqu" name="tXiaoqu" class="form-control" type="text" th:value="${member.tXiaoqu}"/></td>
								</tr>
								<!--<tr>-->
									<!--<th class="required" style="text-align: right;">门店商店详细地址</th>-->
									<!--<td><input id="tShopname" name="tShopname" class="form-control" type="text" th:value="${member.tShopname}"/></td>-->
								<!--</tr>-->
								<tr>
									<th class="required" style="text-align: right;">门店详细地址</th>
									<td><input id="tAddress" name="tAddress" class="form-control" type="text" th:value="${member.tAddress}"/></td>
								</tr>
								<tr>
									<th class="required" style="text-align: right;">修改经纬度</th>
									<td><input id="lat" name="lat" class="form-control" type="text" th:value="${member.lat}"/><p onclick="getZuoBiao()" style="height: 5px;"><a>点击获取坐标值</a></p></td>
								</tr>
								<tr>
									<th class="required" style="text-align: right;">注册时间</th>
									<td th:text="${member.createtime} == null ? null : ${#dates.format(member.createtime,'yyyy-MM-dd HH:mm:ss')}"></td>
								</tr>
								<tr>
									<th class="required" style="text-align: right;">提交订单</th>
									<td th:text="${member.orderSum}"></td>
								</tr>
								<tr>
									<th class="required" style="text-align: right;">账户余额</th>
									<td th:text="${member.credit2}"></td>
								</tr>
								<tr>
									<th class="required" style="text-align: right;">累计金额</th>
									<td>--</td>
								</tr>
								</tbody>
							</table>
							<div class="form-group text-center">
								<div class="col-sm-8 col-sm-offset-2">
									<button type="submit"  class="btn btn-primary"><i class="fa fa-check"></i>提交</button>
									<div class="btn btn-danger" onclick="closeDow()"><i class="fa fa-remove"></i> 关闭</div>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>

	</div>
	<div th:include="centre/manage/include::footer"></div>
	<script type="text/javascript" src="/js/plugins/layui/layui.js"></script>
	<script type="text/javascript" src="/js/appjs/commander/manage/editCommander.js"></script>
	  <script src="/js/jquery-select/jquery.searchableSelect.js"></script>
	
	<script type="text/javascript">
	$(function(){
		var flag =  $("#flag").val();
		if(flag==0){
			$('#centreId').searchableSelect();
		}
	});
		function closeDow() {
			var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
			parent.layer.close(index);
		}
		function getZuoBiao() {
		    //baidu  http://api.map.baidu.com/lbsapi/getpoint/index.html
			//高德  https://lbs.amap.com/console/show/picker
			window.open("https://lbs.amap.com/console/show/picker");
		}
	</script>
</body>
</html>
